#pragma once

#include"system_ability.h"
#include"iremote_broker.h"
#include<string>

namespace OHOS {
namespace Usart_Standard{

//这个有可能与本来的systemService撞车，到时候再换
//详见 //utils/system/safwk/native/include/system_ability_definition.h
const int USART_SERVICE_ID=9901;



class IUsartAbility : public IRemoteBroker {
public:
	virtual int open(const std::string& name)=0;
	virtual int close(const std::string& name)=0;
	virtual bool is_open(const std::string& name)=0;

    virtual int write(const std::string& name,const std::string& data) = 0;
	
	virtual std::string read(const std::string& name,size_t bytes) = 0;
	virtual std::string readline(const std::string& name) = 0;
	
	virtual void begin_read_loop(const std::string& name) = 0;
	virtual void end_read_loop(const std::string& name) = 0;
	virtual std::string read_from_looper(const std::string& name) = 0;
public:
    DECLARE_INTERFACE_DESCRIPTOR(u"IUsartAbility");
};//IUsartAbility

}//Usart_Standard

}//namespace OHOS